﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BiffenService;
using BiffenService.Model;

namespace BiffenService.Db
{
    public interface IBookingDb
    {
        /// <summary>
        /// A method that sends an int bookingId in order to receive a booking with the specific Id
        /// </summary>
        /// <param name="bookingId">int bookingId, the bookingId of a specific booking</param>
        /// <returns>A Booking object with the parameter bookingId</returns>
        Booking FindBookingById(int bookingId);

        /// <summary>
        /// A method that sends an int phone in order to receive a list og type booking from bookingDb
        /// Purpose to find one or more bookings from a specific phone number
        /// </summary>
        /// <param name="phone">int phone, the phonenumber of a customer or member</param>
        /// <returns>List of type Booking, a list of all bookings with the actual phone number</returns>
        List<Booking> FindBookingIdByPhone(int phone);

        /// <summary>
        /// A method that deletes a booking from the bookingId
        /// </summary>
        /// <param name="bookingId">int bookingId, an Id of a booking</param>
        /// <returns>int result, amount of rows affected in the sql database</returns>
        int DeleteBookingById(int bookingId);

        /// <summary>
        /// A method that inserts a booking into the database
        /// </summary>
        /// <param name="Status">int Status the status of the booking, if it is sold or reserved</param>
        /// <param name="PhoneNumber">int PhoneNumber the customers phonenumber</param>
        /// <param name="DiscountType">int DiscountType the type of the discount if it is study(1), senior(2) or none(3)</param>
        /// <param name="ShowId">int ShowId the Id of show wanted to reserve</param>
        /// <param name="Seats">List seats a List with all the seats wanted to reserve</param>
        /// <param name="MemberId">int MemberId the id of the member if the reservation is for a member</param>
        /// <returns>int result, the number of rows affected in the sql database</returns>
        int CreateBooking(int Status, int PhoneNumber, int DiscountType, int ShowId, List<int> Seats, int memberId);

        /// <summary>
        /// A method that send an object show of type Show in order to receive a List of type Booking
        /// </summary>
        /// <param name="show">Show show, a show of type Show</param>
        /// <returns>A list of type Booking, every booking containing the parameter show</returns>
        List<Booking> GetBookingsForShow(Show show);

        /// <summary>
        /// A method that marks a Booking as sold
        /// </summary>
        /// <param name="id">int id, the Id of a specific booking</param>
        /// <returns>int result, the number of rows affected in the sql database</returns>
        int MarkBookingAsSold(int id);

        Discount GetDiscount(int discountType);
    }
}